﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StockIn_Other.ascx.cs" Inherits="Controls_Activity_StockIn_Other" %>
<%@ Register Src="SelectGood.ascx" TagName="GoodItemSelect" TagPrefix="uc1" %>
 <asp:Panel ID="pnlItemsGrid" runat="server" CssClass="centerPanel" Width="100%">
 <div class="webPanelBorder" >
        <div class="webPanelCaption">入库单信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">入库日期：
                    </td>
                    <td><asp:TextBox ID="P_StockInDate" onfocus="calendar.ShowCaltable(this, event);" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField1" runat="server" />
                    </td>
                     <td class="tableSubjectWidth">入库类型：
                    </td>
                    <td><asp:TextBox ID="TextBox1" runat="server" CssClass="shortInput" MaxLength="64" Text="其它入库" ReadOnly="true"></asp:TextBox>
                    </td>
                </tr>
                <tr> 
                    <td>供 应 商：
                    </td>
                    <td><asp:TextBox ID="P_SupplierID" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                    </td>
                    <td>备    注：</td>
                    <td><asp:TextBox ID="P_Description" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>经 办 人：</td>
                    <td><asp:TextBox ReadOnly="true" ID="P_LoginName" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                    <td>经办部门：</td>
                    <td><asp:TextBox ReadOnly="true" ID="P_Department" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr>  
                </table>               
        </div>  
    </div>
    
 <div class="webPanelBorder" > 
    <div class="webPanelCaption">具体物料项</div>
    <div class="webPanelContent">
      <ofcc:GridView ID="gridViewItems" runat="server" AutoGenerateColumns="False" 
        OnRowDataBound="gridViewItems_RowDataBound" onrowdeleting="gridViewItems_RowDeleting" OnRowEditing="gridViewItems_RowEditing" >
            <Columns>
                <asp:HyperLinkField DataTextField="GoodsCode" HeaderText="物料编号" NavigateUrl="#" Target="_blank" />
                <asp:BoundField DataField="Subject" HeaderText="物料名称" />
                <asp:BoundField DataField="CategoryName" HeaderText="物料类型" />
                <asp:BoundField DataField="GoodsMaker" HeaderText="品牌厂商" />
                <asp:BoundField DataField="TypeModel" HeaderText="规格型号" />
                <asp:BoundField DataField="GoodsUnit" HeaderText="单位" /> 
                <asp:TemplateField HeaderText="入库数量">
                    <ItemTemplate>
                        <asp:HiddenField ID ="GoodsID" runat="server" Value='<%#Eval("GoodsID") %>' />
                        <asp:TextBox ID="GoodsCount" runat="server" CssClass="smallInput" Width="80" value='<%#DataBinder.Eval(Container.DataItem,"GoodsCount")%>' name="GoodsCount" type="text" ></asp:TextBox> 
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="损耗/丢失数量">
                    <ItemTemplate>
                        <asp:TextBox ID="BadCount" runat="server" CssClass="smallInput" Width="80" value='<%#DataBinder.Eval(Container.DataItem,"BadCount")%>' name="StandardCost" type="text" ></asp:TextBox> 
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="旧料收回数量">
                    <ItemTemplate>
                        <asp:TextBox ID="OldCount" runat="server" CssClass="smallInput" Width="80" value='<%#DataBinder.Eval(Container.DataItem,"OldCount")%>' name="StandardCost" type="text" ></asp:TextBox> 
                    </ItemTemplate>
                </asp:TemplateField>  
                <asp:TemplateField HeaderText="备注">
                    <ItemTemplate>
                        <asp:TextBox ID="Description" runat="server" CssClass="smallInput" Width="100" value='<%#DataBinder.Eval(Container.DataItem,"Description")%>' name="Description" type="text" ></asp:TextBox> 
                    </ItemTemplate> 
                </asp:TemplateField> 
                <asp:BoundField DataField="IsCheck" HeaderText="状态" />  
                <asp:CommandField ShowEditButton="true" EditText="确认"/>
                <asp:CommandField ShowDeleteButton="true" DeleteText="删除"/>
            </Columns>
        </ofcc:GridView>
    </div>     
</div> 
     <uc1:GoodItemSelect ID="GoodItemSelect" runat="server" />  
     <div class="webPanelButtonArea">
        <ofcc:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" CssClass="linkButton" ValidationGroup="select">选择</ofcc:LinkButton> 
        <ofcc:LinkButton ID="btnSubmit" runat="server" ConfirmMessage="完成入库后将不能被删除或修改操作，确定完成入库？" OnClick="btnSubmit_Click" CssClass="linkButton" ValidationGroup="submit">完成入库</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">取消</ofcc:LinkButton>
    </div>
    <asp:HiddenField ID="hfAddOrEdit" runat="server" />
    <asp:HiddenField ID="hfStockInID" runat="server" />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="P_StockInDate"
    Display="None" ErrorMessage="请选择入库日期" ValidationGroup="submit"></asp:RequiredFieldValidator>  
</asp:Panel> 